package com.meng.b_service;

import com.meng.c_dao.UserMapper;
import com.meng.d_model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户service层
 *
 * @author MENG
 * @version 2017/12/20
 * @see
 */
@Service
public class UserService
{

    @Autowired
    private UserMapper userMapper;

    /**
     * search User by email
     *
     * @param email 邮箱
     * @return
     */
    public User getOne(String email)
    {
        if(email == null && !"".equals(email))
        {
            return null;
        }

        return userMapper.getOne(email);
    }

}
